import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core';

@Component({
  selector: 'app-task-header',
  templateUrl: './task-header.component.html',
  styleUrls: ['./task-header.component.scss']
})
export class TaskHeaderComponent implements OnInit {

  @Input() public header: string;
  @Output() public newTaskDialog = new EventEmitter();
  @Output() public moveAllTask = new EventEmitter();
  @Output() public editTaskName = new EventEmitter();
  @Output() public del = new EventEmitter();
  constructor() {
  }

  ngOnInit() {
  }

  newTask() {
    this.newTaskDialog.emit();
    console.log('new Task dialog');
  }

  onMoveAllClick() {
    this.moveAllTask.emit();
  }

  onEditTaskName() {
    this.editTaskName.emit();
    console.log('修改列表名称');
  }
  onDelClick() {
    this.del.emit();
  }

}
